x86/vioapic: check IRR before attempting to inject interrupt after EOI
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 5 Mar 2021 14:26:05 +0000 (15:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Mar 2021 14:26:05 +0000 (15:26 +0100)
commit761995ee29ac7c43d88a5e853f0a75a653b23b11
treed39f9d2a76970b5b6c708c762afc1bbb82cccdad
parentb0b734a8b3e516ff1040884b755a8d47afed31ea
x86/vioapic: check IRR before attempting to inject interrupt after EOI

In vioapic_update_EOI the irq_lock will be dropped in order to forward
the EOI to the dpci handler, so there's a window between clearing IRR
and checking if the line is asserted where IRR can change behind our
back.

Fix this by checking whether IRR is set before attempting to inject a
new interrupt.

Fixes: 06e3f8f2766 ('vt-d: Do dpci eoi outside of irq_lock.')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: ba584fb1a26c058ebd0e6a2779287b3e4400415c
master date: 2021-01-22 12:13:05 +0100
xen/arch/x86/hvm/vioapic.c